package com.hzncc.scaffold.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.hzncc.scaffold.entity.Other.Message;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzncc.scaffold.entity.Vo.MyMessageVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 * 消息表 Mapper 接口
 * </p>
 *
 * @author DrunkBear
 * @since 2022-04-27
 */
@Component
public interface MessageMapper extends BaseMapper<Message> {


    @Select("SELECT\n" +
            "\t`id`,\n" +
            "\t`content`,\n" +
            "\t`from`,\n" +
            "\t`createTime`,\n" +
            "\t`status` \n" +
            "FROM\n" +
            "\t`message` AS `message` ${ew.customSqlSegment}")
    public List<MyMessageVo> myMessage(@Param(Constants.WRAPPER) QueryWrapper queryWrapper);
}
